A. Field of the Invention
The present invention relates generally to computer software development, and more specifically, to the automatic generation of user menus in a graphical user interface.
B. Description of Related Art
Graphical user interfaces (GUIs) present a graphical (rather than textual) interface through which a user may interact with a computer. In a GUI application, commands that can be invoked by the end user are typically represented as some sort of graphical button on a menu, such as selectable fields in a popup menu, a menubar with pulldown and pullright menus, or as icons on a toolbar.
Applications in a GUI environment often present multiple different visual windows to the user, each of which may include a different set of menu buttons. For example, in an application that monitors and controls a network, a first window may present a graphical illustration of elements in the network, while a second window may give a tabular representation of trouble spots within the network. Conventionally, a programmer designing the first and second windows would individually write the computer code to implement the different set of buttons in the menus in the first and second windows.
Although individually writing the computer code for the buttons in the first and second windows is a straightforward and flexible approach, it is not without its disadvantages. In particular, a first potential problem is that although certain buttons can apply in more than one window, programmers may forget to code all of the applicable buttons for the menus in each window. This can be problematic, because users expect identical objects, such as, for example, a network switch illustrated in two different windows, to support the same operations. A common occurrence of this problem happens when a programmer adds a new menu button to one window but forgets to add the new menu button to other related windows.
A second potential problem associated with conventional techniques is that the computer code that implements the substantive aspect of an element can become intertwined with more generic aspects relating to the particular GUI. In this situation, converting the application to work with another GUI can be time consuming.
Accordingly, there is a need in the art to allow programmers to more easily implement buttons in applications in a GUI environment.
Systems and methods consistent with the present invention address these and other needs by providing for the automatic inclusion of operations, such as the automatic generation of menu buttons, in a window.
A first aspect of the present invention is directed to a method of automatically assigning operations to objects in a graphical window of an application program. The method includes receiving a list of operations and a list of resources required by each of the operations; and receiving a list of resources offered by the window. Based on the received lists, an operation is assigned from the list of operations to the objects in the window when the resources required by the operation are offered by the window.
A second aspect of the present invention is directed to a computing device comprising a plurality of elements. The elements include a program containing at least one graphical window, the graphical window containing graphical objects; and an operations repository containing operations that apply to selected ones of the graphical objects. Additionally, an operations manager component logically couples the windows in the program to the operations repository, compares resources required by the operations in the operations repository to resources offered by the graphical window, and assigns the operations in the operations repository to the graphical windows when the resources required by the operations are offered by the window.
Another aspect of the present invention is directed to a network including a plurality of network objects used to control traffic on the network. The network further includes a computer system, coupled to the plurality of network objects via the network, the computer system including a computer processor and a memory, the memory storing an application program used to monitor the network objects. The application program includes: at least one graphical window displaying graphical representations of the network objects; an operations repository containing operations that apply to selected ones of the network objects; and an operations manager component that logically couples the window to the operations repository. The operations manager component also compares resources required by the operations in the operations repository to resources offered by the graphical window and assigns the operations in the operations repository to the graphical window when the resources required by the operations are offered by the window.